package com.ship.dispatch.util;

import com.ship.dispatch.service.SpYearPlanSchemeDetailService;

import java.util.HashMap;
import java.util.Map;

public class ModuleConst {
    public final static String SP_YEAR_PLAN_SCHEME_DETAIL = "sp_year_plan_scheme_detail";

    private static final Map<Integer, Class<?>> MAP = new HashMap<>(16);

    static {
        MAP.put(1, SpYearPlanSchemeDetailService.class);
    }

    private ModuleConst() {
    }

    public static Class<?> getContractBaseBean(Integer module) {
        if (MAP.containsKey(module)) {
            return MAP.get(module);
        }
        for (Map.Entry<Integer, Class<?>> entry : MAP.entrySet()) {
            int key = entry.getKey();
            if (module.equals(key)) {
                return MAP.get(key);
            }
        }
        return null;
    }
}
